package Demo1;

import javax.management.MBeanAttributeInfo;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-21
 * Time: 12:39
 */
public class Test {
    public static void isDays(int year,int month,int day){
        int[] monthCount=new int[]{31,28,31,30,31,30,31,31,30,31,30,31};
        int sum=0;
        for(int i=0;i<month-1;i++){
            if(i==1&&((year%400==0)||(year%4==0&&year%100!=0)))
                sum+=29;
            else
                sum+=monthCount[i];
        }
        sum+=day;
        System.out.println("这是"+year+"年的第"+sum+"天");

    }

    public static boolean perfectNum(int num){
        if(num==1) return true;
        int sum=0;
        for(int i=1;i<num;i++){
            if(num%i==0){
                sum+=i;
            }
        }
        return sum==num?true:false;
    }
    public static void main(String[] args) {
        isDays(2025,7,21);
        for(int i=1;i<=10000;i++){
            if(perfectNum(i)==true)
                System.out.print(i+" ");
        }

        int count=1;
        for(int i=1;i<=9;i++){
            count+=1;
            count*=2;
        }
        System.out.println(count);

    }
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        char ch=scanner.next().charAt(0);
        if(ch>='A'&&ch<='Z'){
            ch=Character.toLowerCase(ch);
        }
        System.out.println(ch);
    }
}
